import 'package:flutter/material.dart';
import 'package:chewie/chewie.dart';
import 'package:video_player/video_player.dart';

///汽车服务
class CarServicePage extends StatefulWidget {
  @override
  _carServiceState createState() => _carServiceState();
}

class _carServiceState extends State<CarServicePage> {


  static VideoPlayerController  Controller  = VideoPlayerController.network(
      'http://vfx.mtime.cn/Video/2019/03/12/mp4/190312083533415853.mp4');

  ChewieController chewieController = ChewieController(
    videoPlayerController: Controller ,
    aspectRatio: 1,
    autoPlay: true,
    looping: true,
  );


  @override
  void initState() {
    // TODO: implement initState
    super.initState();

  }



  @override
  void dispose() {
    super.dispose();
    Controller.dispose();
    chewieController.dispose();

  }

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar: AppBar(
        title: Text('汽车服务'),
      ),
      body: Container(
        child: Center(
          child: Chewie(
            controller: chewieController,
          ),
        ),
      ),
    );
  }
}

